import request from '@/utils/request'

// 查询外部文件用户权限
export function listPermission(query) {
  return request({
    url: '/file/external/listPermission',
    method: 'get',
    params: query
  })
}
//查询外部文件柜 树形
export function listFileTreeExternal(query) {
  return request({
    url: '/file/external/listFileTree',
    method: 'get',
    params: query
  })
}

// 查询外部文件列表
export function listExternal(query) {
  return request({
    url: '/file/external/list',
    method: 'get',
    params: query
  })
}

// 查询外部文件详细
export function getExternal(internalId) {
  return request({
    url: '/file/external/' + internalId,
    method: 'get'
  })
}

// 新增外部文件
export function addExternal(data) {
  return request({
    url: '/file/external',
    method: 'post',
    data: data
  })
}

// 修改外部文件
export function updateExternal(data) {
  return request({
    url: '/file/external',
    method: 'put',
    data: data
  })
}

// 删除外部文件
export function delExternal(internalId) {
  return request({
    url: '/file/external/' + internalId,
    method: 'delete'
  })
}
